from src import logger_cust,crypt_utils
from src.core import db_utils,str_utils as  stru

if __name__ == '__main__':
    statement = 'SELECT * FROM sys_user WHERE login_id = #{login_id}'
    params = {'login_id': '10203'}
    retvar = db_utils.query(statement, params)
    if retvar:
        print(retvar)

    """data='ssapiadmin'
    encrypted=crypt_utils.aes_encrypt(data)
    print(encrypted)
    
    statement = 'SELECT * FROM sys_user WHERE login_id = #{login_id}'
    params = {'login_id': '10203'}
    retvar = db_utils.query(statement, params)
    if retvar:
        print(retvar)
    
  
    data='test1'
    encrypted=crypt_utils.aes_encrypt(data)
    print(encrypted)
    decrypted=crypt_utils.aes_decrypt(encrypted)
    print(decrypted)
      """
    """
    logger_cust.error('错误测试')
    logger_cust.info('信息测试')
    logger_cust.warning('警告测试')
    logger_cust.debug('调试测试')
    # print(stru.tranDict({"username":"admin"}))
    # print(stru.tranList({"username": "admin","details":{"password":"pas"}},'details'))
    
    print(stru.is_empty(None))
    print(stru.is_empty('None'))
    print(stru.is_not_empty(None))
    print(stru.is_not_empty('None'))
    
    statement = 'SELECT * FROM sys_user WHERE login_id = #{login_id}'
    params = {'login_id': '10203'}
    retvar = db_utils.query(statement, params)
    if retvar:
        print(retvar)
        """

